package com.augn.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class Post implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer postId; //帖子编号
    private String role; //角色，可为用户、传承人、制造商

    private Integer userId; //用户编号
    @TableField(exist = false)
    private String notSort;
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userImage;

    private String title; //标题
    private String detail; //详情
    private String image; //图片
    private String sort; //分类，可为广告

    private Integer views; //浏览量
    private Integer likeCount; //点赞数

    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
